#include "PhysicEngine.h"
#include "CarHuman.h"
#include "Gameplay.h"
#include "InputKeyMouse.h"

namespace condition
{
    bool testDK1()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_1);
    }

    bool testDK2()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_2)|| GAMEPLAY::Gameplay::getInstance().getMode() == GAMEPLAY::Gameplay::GAME_PRE_RACING;
    }

    bool testDK3()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_3);
    }
    bool testDK4()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_4);
    }
    bool testDK5()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_5);
    }
    bool testDK6()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_6);
    }

    bool testDK7()
    {
        return PM3D::InputKeyMouse::getInstance().isKeyDown(DIK_7);
    }

    bool inTunnel()
    {
        D3DXVECTOR3 car = PHYSIC::PhysicEngine::getInstance().getAutoHuman()->getPosition();

        if(car.x < 500.0f || car.x > 900.0f)
            return false;
        if(car.y < 90.0f || car.y > 175.0f)
            return false;

        return true;
    }

} // end namespace
